package com.woniuxy.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.woniuxy.entity.Warehouse;
import com.woniuxy.mapper.WarehouseMapper;
import com.woniuxy.service.WarehouseService;
@Service
public class WarehouseServiceImpl implements WarehouseService{
	@Autowired
 	private WarehouseMapper warehouseMapper;
	//查询所有仓库
	@Override
	public List<Warehouse> findAllWarehouse() {
		return warehouseMapper.findAllWarehouse();
	}

	//根据状态查询仓库
	@Override
	public List<Warehouse>findWarehouseByStatus(int status){
		return warehouseMapper.findWarehouseByStatus(status);
	}
	//根据关键字模糊查询
	@Override
	public List<Warehouse> findWarehouseByWords(String words){
		return warehouseMapper.findWarehouseByWords(words);
	}
	//新增角色
	@Override
	public int insertWarehouse(Warehouse warehouse) {
		return warehouseMapper.insertWarehouse(warehouse);
	}

	@Override
	public int delByWid(int wid) {
		return warehouseMapper.delByWid(wid);
	}
	
}
